            <% content_for :sidebar do -%>
            <div class="side_box">
                <ul class="menu">
                    <li><%= image_tag("house_go.png", :align=>"absmiddle")%> <%= link_to "返回论坛首页", forums_path %></li>
                    <% if @topic.forum.class == CommunityForum -%>
                    <li><%= image_tag("house_go.png", :align=>"absmiddle")%> <%= link_to "返回#{@topic.forum.community.title}论坛", forum_path(@topic.forum) %></li>
                    <% else -%>
                    <li><%= image_tag("house_go.png", :align=>"absmiddle")%> <%= link_to "返回#{@topic.forum.title}论坛", forum_path(@topic.forum) %></li>
                    <% end -%>            
                </ul>
            </div>
	    <% end -%>
            
            
            <div class="box">
                <img class="map" align="absmiddle" alt="You are here" src="/images/map.png"/>
                当前位置 
                » <%= link_to "您这儿", :controller =>'browse', :action => 'index' %>
                » <%= link_to "论坛", forums_path %>
                <% if @topic.forum.class == CommunityForum -%>
                » <%= link_to "#{@topic.forum.community.title}论坛", forum_path(@topic.forum) %>
                <% else -%>
                » <%= link_to "#{@topic.forum.title}论坛", forum_path(@topic.forum) %>
                <% end -%>
                » <%= @topic.title%>
                <%= feed_icon_tag @topic.title, formatted_topic_path(@topic.forum, @topic, :rss) %>
            </div>
            <div class="box">  
                <table width="99%">
                    <tr>
                        <td valign="top" align="center" width="10%">
                            <%= render :partial => 'shared/userPorlet', :object =>@topic.user%>
                        </td>
                        <td valign="top" align="center" width="90%">
                        <table cellspacing="0" cellpadding="0" border="0" width="99%">
                            <tr>
                                <td width="25" height="30" class="lt"/>
                                <td height="30" class="ct"/>
                                <td width="11" height="30" class="rt"/>
                            </tr>
                            <tr>
                                <td width="25" valign="top" class="lm"/>
                                <td valign="top" class="origin">
                                <h1 class="title"><%= @topic.title%></h1>
			        <p>
				    <span class="sub_i">
				    <%if current_user == @topic.user -%>
                                        <%= link_to '编辑', topic_path(@topic.forum, @topic) %>
                                    <%end -%>
                                    <%if current_user == @topic.user || (@topic.forum.class == CommunityForum && @topic.forum.community.can_edit?(current_user) ) -%>
                                        <%= link_to('删除', topic_path(@topic.forum, @topic), :confirm => "Are you sure?", :method => :delete)%>
				    <%end -%>
                                    <%=local_date @topic.created_at%> 来自 <%= link_to "#{@topic.user.display_name}", user_path(@topic.user.login) %>
				    </span>
			        </p>
			        <%= textilize @topic.content %>
                                </td>
                                <td width="11" class="rm"/>
                            </tr>
                            <tr>
                                <td width="25" height="32" class="lb"/>
                                <td height="25" class="cb"/>
                                <td width="11" height="32" class="rb"/>
                            </tr>
                        </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </div>
    
            <div class="box">
                <% if @replies.size > 0 -%>
                    <%= image_tag("comments.png", :align=>"absmiddle")%> 回复......
                    <hr/>
                    <%=render :partial => 'replies', :object => @replies%>
                <% else -%>
                    <p class="greenfont">目前这个主题还没有回复</p>
                <% end -%>
                <hr/>
                <% if !current_user.nil? -%>
                    <%= image_tag("comments_add.png", :align=>"absmiddle")%> 回复一下吧
                    <%= error_message_on "topic_reply", "content" %>
                    <%= render(:partial => "replyForm")%>
                <% else -%>
                    你<%= link_to "登录", login_users_path %>后才可以发表评论
                <% end -%>
            </div>

